package com.x.Part8_arrayTools;

/**
 * ClassName: ArrayTest
 * Package: IntelliJ IDEA
 * Description:
 * Written by HanXu
 * Create 2023/9/17 17:51
 */
public class ArrayTest {
    public static void main(String[] args) {
        int[] arr = new int[]{12, 34, 1, 35, -1, 2323, 45, 99, -100};

        intArray arrs = new intArray();

        System.out.println("均值："+arrs.getAvg(arr));
        System.out.println("最大值："+arrs.getMax(arr));
        System.out.println("求和："+arrs.getSum(arr));
        arrs.print(arr);//原数组
        System.out.println(arrs.linearSearch(arr, 99));
        System.out.println(arrs.linearSearch(arr, 9));
        arrs.reverse(arr);//反转操作
        arrs.print(arr);//打印反转数组
        arrs.sort(arr);//排序操作
        arrs.print(arr);//打印排序后数组




    }
}
